/******************************************************************************

  Copyright (C), 2012-2016, ZHANGYA

 ******************************************************************************
  File Name     : windows.h
  Version       : Initial Draft
  Author        : zhangya
  Created       : 2024/5/10
  Last Modified :
  Description   : windows.h
  Function List :
  History       :
  1.Date        : 2024/5/10
    Author      : zhangya
    Modification: Created file

******************************************************************************/
#ifndef _WINDOWS_H_
#define _WINDOWS_H_

#include "main.h"
#include "ugui.h"

#ifdef __cplusplus
extern "C" {
#endif

/*--------------------------------------------------------------------*
 * $external variables                           *
 *--------------------------------------------------------------------*/
#define MENU_SUB_EN					(1)

/*--------------------------------------------------------------------*
 * $external routine prototypes                  *
 *--------------------------------------------------------------------*/
typedef enum ctl_menu{
	CTL_NULL,
	CTL_UP,
	CTL_DOWN,
	CTL_UP_LONG,
	CTL_DOWN_LONG,
	CTL_MENU
}ctl_menu_e;

typedef enum data_index{
	DATA_NULL,
	DATA_RED_GAIN,
	DATA_GREEN_GAIN,
	DATA_BLUE_GAIN,
	DATA_SATURATION,
	DATA_BRIGHTNESS,
	DATA_CONTRAST,
	DATA_HUE,
	DATA_SHARPNESS,
	DATA_DENOISE,
	DATA_EDGE,
	DATA_INPUT,
	DATA_APP_VER,
	DATA_FPGA_VER
}data_index_e;
/*--------------------------------------------------------------------*
 * $internal routine prototypes                  *
 *--------------------------------------------------------------------*/
typedef void (*win_set_value)(uint16_t index, int32_t value);
typedef void (*win_set_def_value)(void);
typedef int32_t (*win_get_value)(uint16_t index);
typedef char * (*win_get_str)(uint16_t index);

typedef struct win_fun_s{
	win_set_value set_value;
	win_set_def_value set_def_value;
	win_get_value get_value;
	win_get_str   get_str;
}win_fun_t;
/*--------------------------------------------------------------------*
 * $project-wide global variables                *
 *--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*
 * $module-wide global variables                 *
 *--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*
 * $constants                                    *
 *--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*
 * $macros                                       *
 *--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*
 * $routines' implementations                    *
 *--------------------------------------------------------------------*/

void win_init(win_fun_t * fun);
void win_update_show(void);
void win_control_menu(const uint16_t ctl);
void win_tips_update(const char * str);

#ifdef __cplusplus
}
#endif

#endif  //#ifndef _WINDOWS_H_

